#ifndef PORT_I2C_H
#define PORT_I2C_H

#include <stdint.h>

uint8_t i2c_init(uint8_t ch);
uint8_t i2c_check(uint8_t ch, uint8_t slave_addr);
uint8_t i2c_write_bytes(uint8_t ch, uint8_t slave_addr, uint8_t reg_addr, uint8_t* data, uint8_t len);
uint8_t i2c_read_bytes(uint8_t ch, uint8_t slave_addr, uint8_t reg_addr, uint8_t* data, uint8_t len);
uint8_t i2c_write_mem(uint8_t ch, uint8_t slave_addr, uint8_t* data, uint8_t len);
uint8_t i2c_read_mem(uint8_t ch, uint8_t slave_addr, uint8_t* data, uint8_t len);
#endif /*PORT_I2C_H*/